﻿<%
'API 接口核心,外部不要引用
'TODO 插件与配置没有直接关联,最好不要直接读取配置

'不允许直接引用
API_NO_ALLOW

%>
<!--#include file="h.asp"-->
<%

Function installPlugIn(name, remark)
	Err.Clear
	Dim connstr_,conn_
	connstr_="Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database PASSWORD=;Data Source="&Server.MapPath(""&dbm&"")
	set conn_=server.createobject("ADODB.CONNECTION")
	conn_.open connstr_

	name=Trim(name)
	Set rs=Server.CreateObject("ADODB.Recordset")
	rs.open "select top 1 name,url,savetime,installed,remark from 74hu_plugin where name='"&name&"'",conn_,1,3
	If rs.eof Then
		rs.addnew
		rs("name")=name
		rs("remark")=remark
		rs("installed")=1
		rs("savetime")=time_now
		rs.update
	Else
		rs("remark")=remark
		rs.update
	End If
	rs.close
	Set rs=Nothing

	conn_.close
	set conn_=Nothing
	If Err.Number<>0 Then
		installPlugIn=False
	Else
		installPlugIn=True
	End If
End Function

%>